home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / QuickTime / QT Tools / QuickTime Interfacing.sit / QuickTime Interfacing / ImageCompression.h / ImageCompression.h
Encoding:
C/C++ Source or Header  |  1992-10-21  |  21.4 KB  |  749 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Friday, October 2, 1992 at 11:39 AM
  4.  ImageCompression.h
  5.  C Interface to the Macintosh Libraries
  6.  
  7.  Copyright Apple Computer, Inc. 1991, 1992
  8.  All rights reserved
  9.  
  10. ************************************************************/
  11.  
  12. #ifndef __IMAGECOMPRESSION__
  13. #define __IMAGECOMPRESSION__
  14. #ifndef __QUICKDRAW__
  15. #include <QuickDraw.h>
  16. #endif
  17.  
  18. #ifndef __QDOFFSCREEN__
  19. #include <QDOffscreen.h>
  20. #endif
  21.  
  22. #ifndef __TYPES__
  23. #include <Types.h>
  24. #endif
  25.  
  26. #ifndef __COMPONENTS__
  27. #include <Components.h>
  28. #endif
  29.  
  30. #ifndef __STANDARDFILE__
  31. #include <StandardFile.h>
  32. #endif
  33.  
  34.  
  35. #define gestaltCompressionMgr 'icmp'
  36.  
  37.  
  38. struct MatrixRecord {
  39.     Fixed matrix[3][3];
  40. };
  41.  
  42. typedef struct MatrixRecord MatrixRecord;
  43. typedef MatrixRecord *MatrixRecordPtr;
  44.  
  45. typedef struct FixedPoint {
  46.     Fixed x;
  47.     Fixed y;
  48. } FixedPoint;
  49.  
  50. typedef struct FixedRect {
  51.     Fixed left;
  52.     Fixed top;
  53.     Fixed right;
  54.     Fixed bottom;
  55. } FixedRect;
  56.  
  57.  
  58. #define    codecInfoDoes1                (1L<<0)
  59. #define    codecInfoDoes2                (1L<<1)
  60. #define    codecInfoDoes4                (1L<<2)
  61. #define    codecInfoDoes8                (1L<<3)
  62. #define    codecInfoDoes16                (1L<<4)
  63. #define    codecInfoDoes32                (1L<<5)
  64. #define    codecInfoDoesDither            (1L<<6)
  65. #define    codecInfoDoesStretch        (1L<<7)
  66. #define    codecInfoDoesShrink            (1L<<8)
  67. #define    codecInfoDoesMask            (1L<<9)
  68.  
  69. #define    codecInfoDoesTemporal        (1L<<10)
  70.  
  71. #define    codecInfoDoesDouble            (1L<<11)
  72. #define    codecInfoDoesQuad            (1L<<12)
  73. #define    codecInfoDoesHalf            (1L<<13)
  74. #define    codecInfoDoesQuarter        (1L<<14)
  75.  
  76. #define    codecInfoDoesRotate            (1L<<15)
  77. #define    codecInfoDoesHorizFlip        (1L<<16)
  78. #define    codecInfoDoesVertFlip        (1L<<17)
  79. #define    codecInfoDoesSkew            (1L<<18)
  80. #define    codecInfoDoesBlend            (1L<<19)
  81. #define    codecInfoDoesWarp            (1L<<20)
  82. #define    codecInfoDoesRecompress        (1L<<21)
  83. #define    codecInfoDoesSpool            (1L<<22)
  84. #define    codecInfoDoesRateConstrain    (1L<<23)
  85.  
  86. #define    codecInfoDepth1                (1L<<0)
  87. #define    codecInfoDepth2                (1L<<1)
  88. #define    codecInfoDepth4                (1L<<2)
  89. #define    codecInfoDepth8                (1L<<3)
  90. #define    codecInfoDepth16            (1L<<4)
  91. #define    codecInfoDepth32            (1L<<5)
  92. #define    codecInfoDepth24            (1L<<6)
  93. #define    codecInfoDepth33            (1L<<7)
  94. #define    codecInfoDepth34            (1L<<8)
  95. #define    codecInfoDepth36            (1L<<9)
  96. #define    codecInfoDepth40            (1L<<10)
  97. #define    codecInfoStoresClut            (1L<<11)
  98. #define    codecInfoDoesLossless        (1L<<12)
  99. #define    codecInfoSequenceSensitive    (1L<<13)
  100.  
  101. #define    codecFlagUseImageBuffer        (1L<<0)
  102. #define    codecFlagUseScreenBuffer    (1L<<1)
  103. #define    codecFlagUpdatePrevious        (1L<<2)
  104. #define    codecFlagNoScreenUpdate        (1L<<3)
  105. #define    codecFlagWasCompressed        (1L<<4)
  106. #define    codecFlagDontOffscreen        (1L<<5)
  107. #define    codecFlagUpdatePreviousComp    (1L<<6)
  108. #define    codecFlagForceKeyFrame        (1L<<7)
  109. #define    codecFlagOnlyScreenUpdate    (1L<<8)
  110. #define    codecFlagLiveGrab            (1L<<9)
  111. #define    codecFlagDontUseNewImageBuffer (1L<<10)
  112. #define    codecFlagInterlaceUpdate     (1L<<11)
  113.  
  114.  
  115. #define    codecFlagUsedNewImageBuffer    (1L<<14)
  116. #define    codecFlagUsedImageBuffer    (1L<<15)
  117.  
  118. #define    codecErr                    -8960
  119. #define    noCodecErr                    -8961
  120. #define    codecUnimpErr                -8962
  121. #define    codecSizeErr                -8963
  122. #define    codecScreenBufErr            -8964
  123. #define    codecImageBufErr            -8965
  124. #define    codecSpoolErr                -8966
  125. #define    codecAbortErr                -8967
  126. #define    codecWouldOffscreenErr        -8968
  127. #define    codecBadDataErr                -8969
  128. #define    codecDataVersErr            -8970
  129. #define    codecExtensionNotFoundErr    -8971
  130. #define    codecConditionErr            -8972
  131. #define    codecOpenErr                -8973
  132. #define    codecMinimumDataSize        32768
  133.  
  134. #define    compressorComponentType            'imco'
  135. #define    decompressorComponentType        'imdc'
  136.  
  137. typedef    Component        CompressorComponent;
  138. typedef    Component        DecompressorComponent;
  139. typedef    Component        CodecComponent;
  140.  
  141. #define    anyCodec                ((CodecComponent)0)
  142. #define    bestSpeedCodec            ((CodecComponent)-1)
  143. #define    bestFidelityCodec        ((CodecComponent)-2)
  144. #define    bestCompressionCodec    ((CodecComponent)-3)
  145.  
  146. typedef    long        CodecType;
  147.  
  148. typedef    unsigned short    CodecFlags;
  149.  
  150. typedef    unsigned long    CodecQ;
  151.  
  152. #define    codecLosslessQuality        0x400L
  153. #define    codecMaxQuality                0x3ffL
  154. #define    codecMinQuality                0x000L
  155. #define    codecLowQuality                0x100L
  156. #define    codecNormalQuality            0x200L
  157. #define    codecHighQuality            0x300L
  158.  
  159. typedef pascal OSErr (*DataProcPtr)(Ptr *dataP,long bytesNeeded,long refcon);
  160.  
  161. typedef pascal OSErr (*FlushProcPtr)(Ptr data,long bytesAdded,long refcon);
  162.  
  163. typedef pascal void (*CompletionProcPtr)(OSErr result,short flags,long refcon);
  164.  
  165. #define    codecCompletionSource        (1<<0)
  166. #define    codecCompletionDest            (1<<1)
  167.  
  168. typedef pascal OSErr (*ProgressProcPtr)(short message,Fixed completeness,long refcon);
  169.  
  170. #define    codecProgressOpen            0
  171. #define    codecProgressUpdatePercent    1
  172. #define    codecProgressClose            2
  173.  
  174. typedef pascal void (*StdPixProcPtr)(PixMap *src,Rect *srcRect,MatrixRecord *matrix,short mode,
  175.     RgnHandle mask,PixMap *matte,Rect *matteRect,short flags);
  176.  
  177. typedef    long ImageSequence;
  178.  
  179. typedef    struct {
  180.     ProgressProcPtr    progressProc;
  181.     long            progressRefCon;
  182. } ProgressProcRecord;
  183.  
  184. typedef    ProgressProcRecord    *ProgressProcRecordPtr;
  185.  
  186. typedef    struct {
  187.     CompletionProcPtr    completionProc;
  188.     long                completionRefCon;
  189. } CompletionProcRecord;
  190.  
  191. typedef    CompletionProcRecord    *CompletionProcRecordPtr;
  192.  
  193. typedef    struct {
  194.     DataProcPtr        dataProc;
  195.     long            dataRefCon;
  196. } DataProcRecord;
  197.  
  198. typedef    DataProcRecord    *DataProcRecordPtr;
  199.  
  200. typedef    struct {
  201.     FlushProcPtr    flushProc;
  202.     long            flushRefCon;
  203. } FlushProcRecord;
  204.  
  205. typedef    FlushProcRecord    *FlushProcRecordPtr;
  206.  
  207. typedef pascal void (*AlignmentProcPtr)(Rect *rp, long refcon);
  208.  
  209. typedef    struct {
  210.     AlignmentProcPtr    alignmentProc;
  211.     long                alignmentRefCon;
  212. } AlignmentProcRecord;
  213.  
  214. typedef    AlignmentProcRecord    *AlignmentProcRecordPtr;
  215.  
  216. typedef struct {
  217.     long    dataRate;
  218.     long    dataOverrun;
  219.     long    frameDuration;
  220.     long    keyFrameRate;
  221.     CodecQ    minSpatialQuality;
  222.     CodecQ    minTemporalQuality;
  223. } DataRateParams;
  224.  
  225. typedef     DataRateParams *DataRateParamsPtr;
  226.  
  227. typedef struct ImageDescription {
  228.     long        idSize;
  229.     CodecType    cType;
  230.     long        resvd1;
  231.     short        resvd2;
  232.     short        dataRefIndex;
  233.     short        version;
  234.     short        revisionLevel;
  235.     long        vendor;
  236.     CodecQ        temporalQuality;
  237.     CodecQ        spatialQuality;
  238.     short        width;
  239.     short        height;
  240.     Fixed        hRes;
  241.     Fixed        vRes;
  242.     long        dataSize;
  243.     short        frameCount;
  244.     char        name[32];
  245.     short        depth;
  246.     short        clutID;
  247. } ImageDescription;
  248.  
  249. typedef    ImageDescription    *ImageDescriptionPtr;
  250.  
  251. typedef    ImageDescription    **ImageDescriptionHandle;
  252.  
  253. typedef struct CodecInfo {
  254.     char             typeName[32];
  255.     short            version;
  256.     short            revisionLevel;
  257.     long            vendor;
  258.     long             decompressFlags;
  259.     long             compressFlags;
  260.     long             formatFlags;
  261.     unsigned char    compressionAccuracy;
  262.     unsigned char    decompressionAccuracy;
  263.     unsigned short    compressionSpeed;
  264.     unsigned short    decompressionSpeed;
  265.     unsigned char    compressionLevel;
  266.     char            resvd;
  267.     short            minimumHeight;
  268.     short            minimumWidth;
  269.     short            decompressPipelineLatency;
  270.     short            compressPipelineLatency;
  271.     long            privateData;
  272. } CodecInfo;
  273.  
  274. typedef    struct {
  275.     CodecComponent        codec;
  276.     CodecType        cType;
  277.     char            typeName[32];
  278.     Handle            name;
  279. } CodecNameSpec;
  280.  
  281. typedef    struct {
  282.     short            count;
  283.     CodecNameSpec    list[1];
  284. }CodecNameSpecList;
  285.  
  286. typedef    CodecNameSpecList *CodecNameSpecListPtr;
  287.  
  288. #define    defaultDither    0
  289. #define    forceDither        1
  290. #define    suppressDither    2
  291.  
  292. #ifdef __cplusplus
  293. extern "C" {
  294. #endif __cplusplus
  295.  
  296. pascal    OSErr
  297. CodecManagerVersion(long *version)
  298.     = {0x7000,0xAAA3};
  299.     
  300. pascal OSErr
  301. GetCodecNameList(CodecNameSpecListPtr *list,short showAll)
  302.     = {0x7001,0xAAA3};
  303.  
  304. pascal OSErr
  305. DisposeCodecNameList(CodecNameSpecListPtr list)
  306.     = {0x700F,0xAAA3};
  307.  
  308. pascal    OSErr
  309. GetCodecInfo(CodecInfo *info,CodecType cType,CodecComponent codec)
  310.     = {0x7003,0xAAA3};
  311.  
  312. pascal OSErr
  313. GetMaxCompressionSize(PixMapHandle src,const Rect *srcRect, short colorDepth,CodecQ quality,
  314.         CodecType cType,CompressorComponent codec,long *size)
  315.     = {0x7004,0xAAA3};
  316.  
  317. pascal OSErr
  318. GetCompressionTime(PixMapHandle src,const Rect *srcRect, short colorDepth,
  319.         CodecType cType,CompressorComponent codec,
  320.         CodecQ *spatialQuality,CodecQ *temporalQuality,unsigned long *compressTime)
  321.     = {0x7005,0xAAA3};
  322.  
  323. pascal OSErr
  324. CompressImage(PixMapHandle src,const Rect *srcRect,CodecQ quality,CodecType cType,
  325.         ImageDescriptionHandle desc,Ptr data)
  326.     = {0x7006,0xAAA3};
  327.  
  328. pascal OSErr
  329. FCompressImage(PixMapHandle src,const Rect *srcRect, short colorDepth,
  330.         CodecQ quality,CodecType cType,CompressorComponent codec,CTabHandle clut,
  331.         CodecFlags flags,long bufferSize,
  332.         FlushProcRecordPtr flushProc,ProgressProcRecordPtr progressProc, ImageDescriptionHandle desc,Ptr data)
  333.     = {0x7007,0xAAA3};
  334.  
  335. pascal OSErr
  336. DecompressImage(Ptr data,ImageDescriptionHandle desc,PixMapHandle dst,
  337.         const Rect *srcRect,const Rect *dstRect,short mode,RgnHandle mask)
  338.     = {0x7008,0xAAA3};
  339.  
  340. pascal OSErr
  341. FDecompressImage(Ptr data,ImageDescriptionHandle desc,PixMapHandle dst,const Rect *srcRect,
  342.         MatrixRecordPtr matrix,short mode,RgnHandle mask,
  343.         PixMapHandle matte,const Rect *matteRect,
  344.         CodecQ accuracy,DecompressorComponent codec,
  345.         long bufferSize,DataProcRecordPtr dataProc,ProgressProcRecordPtr progressProc)
  346.     = {0x7009,0xAAA3};
  347.  
  348. pascal OSErr
  349. CompressSequenceBegin(ImageSequence *seqID,PixMapHandle src,PixMapHandle prev,
  350.         const Rect *srcRect,const Rect *prevRect,short colorDepth,CodecType cType,CompressorComponent codec,
  351.         CodecQ spatialQuality,CodecQ temporalQuality,long keyFrameRate,
  352.         CTabHandle clut,CodecFlags flags,ImageDescriptionHandle desc)
  353.     = {0x700A,0xAAA3};
  354.  
  355. pascal OSErr
  356. CompressSequenceFrame(ImageSequence seqID,PixMapHandle src,const Rect *srcRect,
  357.         CodecFlags flags,Ptr data,long *dataSize,
  358.         unsigned char *similarity,CompletionProcRecordPtr asyncCompletionProc)
  359.     = {0x700B,0xAAA3};
  360.  
  361. pascal OSErr
  362. DecompressSequenceBegin(ImageSequence *seqID,ImageDescriptionHandle desc,
  363.         CGrafPtr port,GDHandle gdh,const Rect *srcRect,MatrixRecordPtr matrix,
  364.         short mode,RgnHandle mask,CodecFlags flags,CodecQ accuracy,DecompressorComponent codec)
  365.     = {0x700D,0xAAA3};
  366.  
  367. pascal OSErr
  368. DecompressSequenceFrame(ImageSequence seqID,Ptr data,
  369.         CodecFlags inFlags,CodecFlags *outFlags,CompletionProcRecordPtr asyncCompletionProc)
  370.     = {0x700E,0xAAA3};
  371.  
  372. pascal OSErr
  373. DecompressSequenceFrameS(ImageSequence seqID,Ptr data,long dataSize,
  374.         CodecFlags inFlags,CodecFlags *outFlags,CompletionProcRecordPtr asyncCompletionProc)
  375.     = {0x203C,0x16,0x47,0xAAA3};
  376.  
  377. pascal OSErr
  378. SetDSequenceMatrix(ImageSequence seqID,MatrixRecordPtr matrix)
  379.     = {0x7010,0xAAA3};
  380.  
  381. pascal OSErr
  382. SetDSequenceMatte(ImageSequence seqID,PixMapHandle matte,const Rect *matteRect)
  383.     = {0x7011,0xAAA3};
  384.  
  385. pascal OSErr
  386. SetDSequenceMask(ImageSequence seqID,RgnHandle mask)
  387.     = {0x7012,0xAAA3};
  388.  
  389. pascal OSErr
  390. SetDSequenceTransferMode(ImageSequence seqID,short mode,const RGBColor *opColor)
  391.     = {0x7013,0xAAA3};
  392.  
  393. pascal OSErr
  394. SetDSequenceDataProc(ImageSequence seqID,DataProcRecordPtr dataProc,long bufferSize)
  395.     = {0x7014,0xAAA3};
  396.  
  397. pascal OSErr
  398. SetDSequenceAccuracy(ImageSequence seqID,CodecQ accuracy)
  399.     = {0x7034,0xAAA3};
  400.  
  401. pascal OSErr
  402. SetDSequenceSrcRect(ImageSequence seqID,const Rect *srcRect)
  403.     = {0x7035,0xAAA3};
  404.  
  405. pascal OSErr
  406. GetDSequenceImageBuffer(ImageSequence seqID,GWorldPtr *gworld)
  407.     = {0x7015,0xAAA3};
  408.  
  409. pascal OSErr
  410. GetDSequenceScreenBuffer(ImageSequence seqID,GWorldPtr *gworld)
  411.     = {0x7016,0xAAA3};
  412.  
  413. pascal OSErr
  414. SetCSequenceQuality(ImageSequence seqID,CodecQ spatialQuality,CodecQ temporalQuality)
  415.     = {0x7017,0xAAA3};
  416.  
  417. pascal OSErr
  418. SetCSequencePrev(ImageSequence seqID,PixMapHandle prev,const Rect *prevRect)
  419.     = {0x7018,0xAAA3};
  420.  
  421. pascal OSErr
  422. SetCSequenceFlushProc(ImageSequence seqID,FlushProcRecordPtr flushProc,long bufferSize)
  423.     = {0x7033,0xAAA3};
  424.  
  425. pascal OSErr
  426. SetCSequenceKeyFrameRate(ImageSequence seqID,long keyframerate)
  427.     = {0x7036,0xAAA3};
  428.  
  429. pascal OSErr
  430. GetCSequenceKeyFrameRate(ImageSequence seqID,long *keyframerate)
  431.     = {0x203C,0x8,0x4B,0xAAA3};
  432.  
  433. pascal OSErr
  434. GetCSequencePrevBuffer(ImageSequence seqID,GWorldPtr *gworld)
  435.     = {0x7019,0xAAA3};
  436.  
  437. pascal OSErr
  438. CDSequenceBusy(ImageSequence seqID)
  439.     = {0x701A,0xAAA3};
  440.  
  441. pascal OSErr
  442. CDSequenceEnd(ImageSequence seqID)
  443.     = {0x701B,0xAAA3};
  444.  
  445. pascal OSErr
  446. GetCompressedImageSize(ImageDescriptionHandle desc,Ptr data,long bufferSize,
  447.         DataProcRecordPtr dataProc,long *dataSize)
  448.     = {0x701C,0xAAA3};
  449.  
  450. pascal OSErr
  451. GetSimilarity(PixMapHandle src,const Rect *srcRect,ImageDescriptionHandle desc,Ptr data,Fixed *similarity)
  452.     = {0x701D,0xAAA3};
  453.  
  454. pascal OSErr
  455. GetImageDescriptionCTable(ImageDescriptionHandle desc,CTabHandle *ctable)
  456.     = {0x701E,0xAAA3};
  457.  
  458. pascal OSErr
  459. SetImageDescriptionCTable(ImageDescriptionHandle desc,CTabHandle ctable)
  460.     = {0x701F,0xAAA3};
  461.  
  462. pascal OSErr
  463. GetImageDescriptionExtension(ImageDescriptionHandle desc,Handle *extension,long type,long index)
  464.     = {0x7020,0xAAA3};
  465.  
  466. pascal OSErr
  467. SetImageDescriptionExtension(ImageDescriptionHandle desc,Handle extension, long type)
  468.     = {0x7021,0xAAA3};
  469.  
  470. pascal OSErr
  471. RemoveImageDescriptionExtension(ImageDescription **desc, long type, long index)
  472.     = {0x203C,0xC,0x3A,0xAAA3};
  473.  
  474. pascal OSErr
  475. CountImageDescriptionExtensionType(ImageDescription **desc, long type, long *count)
  476.     = {0x203C,0xC,0x3B,0xAAA3};
  477.  
  478. pascal OSErr
  479. GetNextImageDescriptionExtensionType(ImageDescription **desc, long *type)
  480.     = {0x203C,0x8,0x3C,0xAAA3};
  481.  
  482. pascal OSErr
  483. FindCodec(CodecType cType,CodecComponent specCodec,
  484.         CompressorComponent *compressor,DecompressorComponent *decompressor)
  485.     = {0x7023,0xAAA3};
  486.  
  487. pascal OSErr
  488. CompressPicture(PicHandle srcPicture, PicHandle dstPicture,CodecQ quality,CodecType cType)
  489.     = {0x7024,0xAAA3};
  490.  
  491. pascal OSErr
  492. FCompressPicture(PicHandle srcPicture, PicHandle dstPicture,
  493.         short colorDepth, CTabHandle clut,CodecQ quality,
  494.         short doDither,short compressAgain,ProgressProcRecordPtr progressProc,
  495.         CodecType cType,CompressorComponent codec)
  496.     = {0x7025,0xAAA3};
  497.  
  498. pascal OSErr
  499. CompressPictureFile(short srcRefNum, short dstRefNum,CodecQ quality,CodecType cType)
  500.     = {0x7026,0xAAA3};
  501.  
  502. pascal OSErr
  503. FCompressPictureFile(short srcRefNum, short dstRefNum,short colorDepth, CTabHandle clut,
  504.     CodecQ quality, short doDither,short compressAgain,ProgressProcRecordPtr progressProc,
  505.     CodecType cType,CompressorComponent codec)
  506.     = {0x7027,0xAAA3};
  507.  
  508. pascal OSErr
  509. GetPictureFileHeader(short refNum,Rect *frame,OpenCPicParams *header)
  510.     = {0x7028,0xAAA3};
  511.  
  512. pascal OSErr
  513. DrawPictureFile(short refNum,const Rect *frame,ProgressProcRecordPtr progressProc)
  514.     = {0x7029,0xAAA3};
  515.  
  516. pascal OSErr
  517. DrawTrimmedPicture(PicHandle srcPicture,const Rect *frame,RgnHandle trimMask,short doDither,
  518.         ProgressProcRecordPtr progressProc)
  519.     = {0x702E,0xAAA3};
  520.  
  521. pascal OSErr
  522. DrawTrimmedPictureFile(short srcRefnum,const Rect *frame,RgnHandle trimMask,short doDither,
  523.         ProgressProcRecordPtr progressProc)
  524.     = {0x702F,0xAAA3};
  525.  
  526. pascal OSErr
  527. MakeThumbnailFromPicture(PicHandle picture,short colorDepth,PicHandle thumbnail,
  528.         ProgressProcRecordPtr progressProc)
  529.     = {0x702A,0xAAA3};
  530.  
  531. pascal OSErr
  532. MakeThumbnailFromPictureFile(short refNum,short colorDepth,PicHandle thumbnail,
  533.         ProgressProcRecordPtr progressProc)
  534. = {0x702B,0xAAA3};
  535.  
  536. pascal OSErr
  537. MakeThumbnailFromPixMap(PixMapHandle src,const Rect *srcRect,short colorDepth,PicHandle thumbnail,
  538.         ProgressProcRecordPtr progressProc)
  539. = {0x702C,0xAAA3};
  540.  
  541. pascal OSErr
  542. TrimImage(ImageDescriptionHandle desc,Ptr inData,long inBufferSize,DataProcRecordPtr dataProc,
  543.         Ptr    outData,long outBufferSize,FlushProcRecordPtr flushProc,Rect *trimRect,
  544.         ProgressProcRecordPtr progressProc)
  545.     = {0x702D,0xAAA3};
  546.  
  547. pascal OSErr
  548. ConvertImage(ImageDescriptionHandle srcDD,Ptr srcData,short colorDepth,CTabHandle clut,
  549.         CodecQ accuracy,CodecQ quality,CodecType cType,CodecComponent codec,
  550.         ImageDescriptionHandle dstDD,Ptr dstData)
  551.     = {0x7030,0xAAA3};
  552.  
  553. pascal OSErr
  554. GetCompressedPixMapInfo(PixMapPtr pix,ImageDescriptionHandle *desc,Ptr *data,long *bufferSize,
  555.     DataProcRecord *dataProc,ProgressProcRecord *progressProc)
  556.     = {0x7037,0xAAA3};
  557.  
  558. pascal OSErr
  559. SetCompressedPixMapInfo(PixMapPtr pix,ImageDescriptionHandle desc,Ptr data,long bufferSize,
  560.     DataProcRecordPtr dataProc,ProgressProcRecordPtr progressProc)
  561.     = {0x7038,0xAAA3};
  562.  
  563. pascal void
  564. StdPix(PixMapPtr src,const Rect *srcRect,MatrixRecordPtr matrix,short mode,
  565.     RgnHandle mask,PixMapPtr matte,const Rect *matteRect,short flags)
  566.      = {0x700C,0xAAA3};
  567.  
  568. pascal OSErr
  569. TransformRgn(MatrixRecordPtr matrix, RgnHandle rgn)
  570.     = {0x7039,0xAAA3};
  571.  
  572. /***********
  573.     preview stuff
  574. ***********/
  575.  
  576. pascal void SFGetFilePreview(Point where,
  577.                       ConstStr255Param prompt,
  578.                       FileFilterProcPtr fileFilter,
  579.                       short numTypes,
  580.                       SFTypeList typeList,
  581.                       DlgHookProcPtr dlgHook,
  582.                       SFReply *reply)
  583.  = {0x303C,0x41,0xAAA3};
  584.  
  585. pascal void SFPGetFilePreview(Point where,
  586.                        ConstStr255Param prompt,
  587.                        FileFilterProcPtr fileFilter,
  588.                        short numTypes,
  589.                        SFTypeList typeList,
  590.                        DlgHookProcPtr dlgHook,
  591.                        SFReply *reply,
  592.                        short dlgID,
  593.                        ModalFilterProcPtr filterProc)
  594.  = {0x303C,0x42,0xAAA3};
  595.  
  596. pascal void StandardGetFilePreview(FileFilterProcPtr fileFilter,
  597.                             short numTypes,
  598.                             SFTypeList typeList,
  599.                             StandardFileReply *reply)
  600.  = {0x303C,0x43,0xAAA3};
  601.  
  602. pascal void CustomGetFilePreview(FileFilterYDProcPtr fileFilter,
  603.                           short numTypes,
  604.                           SFTypeList typeList,
  605.                           StandardFileReply *reply,
  606.                           short dlgID,
  607.                           Point where,
  608.                           DlgHookYDProcPtr dlgHook,
  609.                           ModalFilterYDProcPtr filterProc,
  610.                           short *activeList,
  611.                           ActivateYDProcPtr activateProc,
  612.                           void *yourDataPtr)
  613.  = {0x303C,0x44,0xAAA3};
  614.  
  615. pascal OSErr MakeFilePreview(short resRefNum, ProgressProcRecordPtr progress)
  616.  = {0x303C,0x45,0xAAA3};
  617.  
  618. pascal OSErr AddFilePreview(short resRefNum, OSType previewType, Handle previewData)
  619.  = {0x303C,0x46,0xAAA3};
  620.  
  621. #ifdef __cplusplus
  622. }
  623. #endif __cplusplus
  624.  
  625. enum {
  626.     sfpItemPreviewAreaUser = 11,
  627.     sfpItemPreviewStaticText = 12,
  628.     sfpItemPreviewDividerUser = 13,
  629.     sfpItemCreatePreviewButton = 14,
  630.     sfpItemShowPreviewButton = 15
  631. };
  632.  
  633. typedef struct {
  634.     unsigned long    modDate;
  635.     short            version;
  636.     OSType            resType;
  637.     short            resID;
  638. } PreviewResourceRecord;
  639. typedef PreviewResourceRecord *PreviewResourcePtr,  **PreviewResource;
  640.  
  641. #ifdef __cplusplus
  642. extern "C" {
  643. #endif __cplusplus
  644.  
  645. pascal void
  646. AlignScreenRect(Rect *rp, AlignmentProcRecordPtr alignmentProc)
  647.     = {0x203C,0x8,0x4C,0xAAA3};
  648.  
  649. pascal void
  650. AlignWindow(WindowPtr wp, Boolean front, const Rect *alignmentRect, AlignmentProcRecordPtr alignmentProc)
  651.     = {0x203C,0xE,0x4D,0xAAA3};
  652.  
  653. pascal void
  654. DragAlignedWindow(WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, AlignmentProcRecordPtr alignmentProc)
  655.     = {0x203C,0x14,0x4E,0xAAA3};
  656.  
  657. pascal long
  658. DragAlignedGrayRgn(RgnHandle theRgn, Point startPt, Rect *boundsRect,
  659.     Rect *slopRect, short axis, ProcPtr actionProc, Rect *alignmentRect, AlignmentProcRecordPtr alignmentProc)
  660.     = {0x203C,0x1E,0x4F,0xAAA3};
  661.  
  662. pascal OSErr
  663. SetCSequenceDataRateParams(ImageSequence seqID,DataRateParamsPtr params)
  664.     = {0x203C,0x8,0x50,0xAAA3};
  665.  
  666. pascal OSErr
  667. SetCSequenceFrameNumber(ImageSequence seqID, long frameNumber)
  668.     = {0x203C,0x8,0x51,0xAAA3};
  669.  
  670. pascal QDErr
  671. NewImageGWorld(GWorldPtr *gworld,ImageDescription **idh,GWorldFlags flags)
  672.     = {0x203C,0xC,0x52,0xAAA3};
  673.  
  674. pascal OSErr
  675. GetCSequenceDataRateParams(ImageSequence seqID,DataRateParamsPtr params)
  676.     = {0x203C,0x8,0x53,0xAAA3};
  677.  
  678. pascal OSErr
  679. GetCSequenceFrameNumber(ImageSequence seqID,long *frameNumber)
  680.     = {0x203C,0x8,0x54,0xAAA3};
  681.  
  682. pascal OSErr
  683. GetBestDeviceRect(GDHandle *gdh, Rect *rp)
  684.     = {0x203C,0x8,0x55,0xAAA3};
  685.  
  686. #ifdef __cplusplus
  687. }
  688. #endif __cplusplus
  689.  
  690. enum {
  691.     identityMatrixType            = 0x00,        /* result if matrix is identity */
  692.     translateMatrixType            = 0x01,        /* result if matrix translates */
  693.     scaleMatrixType             = 0x02,        /* result if matrix scales */
  694.     scaleTranslateMatrixType    = 0x03,        /* result if matrix scales and translates */
  695.     linearMatrixType            = 0x04,        /* result if matrix is general 2 x 2 */
  696.     linearTranslateMatrixType    = 0x05,        /* result if matrix is general 2 x 2 and translates */
  697.     perspectiveMatrixType        = 0x06        /* result if matrix is general 3 x 3 */
  698. };
  699. typedef unsigned short MatrixFlags;
  700.  
  701.  
  702.  
  703. #ifdef __cplusplus
  704. extern "C" {
  705. #endif __cplusplus
  706. pascal short    GetMatrixType(MatrixRecord *m)
  707.         = {0x7014,0xABC2};
  708. pascal void        CopyMatrix(MatrixRecord *m1, MatrixRecord *m2)
  709.         = {0x7020,0xABC2};
  710. pascal Boolean    EqualMatrix(const MatrixRecord *m1, const MatrixRecord *m2)
  711.         = {0x7021,0xABC2};
  712.  
  713. pascal void        SetIdentityMatrix( MatrixRecord *matrix )
  714.         = {0x7015,0xABC2};
  715. pascal void        TranslateMatrix( MatrixRecord *m, Fixed deltaH, Fixed deltaV )
  716.         = {0x7019,0xABC2};
  717. pascal void        RotateMatrix( MatrixRecord *m, Fixed degrees, Fixed aboutX, Fixed aboutY )
  718.         = {0x7016,0xABC2};
  719. pascal void        ScaleMatrix( MatrixRecord *m, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY )
  720.         = {0x7017,0xABC2};
  721. pascal void        SkewMatrix(MatrixRecord *m, Fixed skewX, Fixed skewY, Fixed aboutX, Fixed aboutY)
  722.         = {0x7018,0xABC2};
  723.  
  724. pascal OSErr    TransformFixedPoints(MatrixRecord *m, FixedPoint *fpt, long count)
  725.         = {0x7022,0xABC2};
  726. pascal OSErr    TransformPoints( MatrixRecord *mp, Point *pt1, long count )
  727.         = {0x7023,0xABC2};
  728. pascal Boolean    TransformFixedRect(MatrixRecord *m, FixedRect *fr, FixedPoint *fpp)
  729.         = {0x7024,0xABC2};
  730. pascal Boolean    TransformRect(MatrixRecord *m, Rect *r, FixedPoint *fpp)
  731.         = {0x7025,0xABC2};
  732.  
  733. pascal Boolean    InverseMatrix(MatrixRecord *m, MatrixRecord *im)
  734.         = {0x701C,0xABC2};
  735. pascal void        ConcatMatrix(MatrixRecord *a, MatrixRecord *b)
  736.         = {0x701B,0xABC2};
  737.  
  738. pascal void        RectMatrix(MatrixRecord *matrix,Rect *srcRect,Rect *dstRect)
  739.         = {0x701E,0xABC2};
  740. pascal void        MapMatrix(MatrixRecord *matrix,Rect *fromRect,Rect *toRect)
  741.         = {0x701D,0xABC2};
  742.  
  743. #ifdef __cplusplus
  744. }
  745. #endif __cplusplus
  746.  
  747.  
  748. #endif __IMAGECOMPRESSION__
  749.